#-------------------------------------------------

target := c2main

object =  c2sum.o \
		  c2main.o 

#-------------------------------------------------

SrcSuf      = c
SrcSuf2     = cpp
SrcSuf3     = cc
ObjSuf      = o
LibSuf      = so
LibSuf2     = a
.SUFFIXES: 	.$(SrcSuf) .$(SrcSuf2) .$(SrcSuf3)


CppLFAGS += -O0 -g  -ggdb -std=c++11

#-------------------------------------------------

# all: $(target) 

# -O0 不优化
$(target):$(object)
	g++ $(CppLFAGS)  $(object) -o $(target)  

%.o:%.cpp
# .$(ObjSuf).$(SrcSuf2):
	g++ $(CppLFAGS) -c $< -o $@ 

%.o:%.cc
# .$(ObjSuf).$(SrcSuf3):
	g++ $(CppLFAGS) -c $< -o $@ 

%.o:%.c
# .$(ObjSuf).$(SrcSuf):
	g++ $(CppLFAGS) -c $< -o $@ 

#-------------------------------------------------

.PHONY:cleanobj clean
cleanobj:
	rm -rf *.o
clean:cleanobj
	rm c2main